package xzr1;


import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Work2 {
    public static void main(String[] args) {
        String[] strings = {"aaa", "bbb", "aaa", "abc", "xyz", "123", "xyz"};
        Set<String> set = new HashSet<String>();
        for (int i = 0; i < strings.length; i++) {
            set.add(strings[i]);
        }
        List<String> list = new ArrayList<String>();
        for (String s:set) {
            list.add(s);
        }
        for (String s:list) {
            System.out.println(s);
        }
    }
}
